package com.dky.satell.common;

import org.apache.commons.lang3.StringUtils;

/**
 * @ClassName KafkaKeyUtil
 * @Description TODO
 * @Author superz
 * @Date 2021/4/28 19:52
 * @Version 1.0
 **/
public class KafkaKeyUtil {

    public static String keyByZone(String zone) {
        return zone + "_" + System.currentTimeMillis();
    }

    public static String zoneByKey(String key) {
        return StringUtils.substringBeforeLast(key, "_");
    }
}
